package com.java.base.exercise.jvm;

/**
 * @Author RenPu
 * @Date 2021/10/22 11:19
 * @Version 1.0
 * @Description:字段解析案例 The field Sub.A is ambiguous (模糊不清的，当注释掉Sub的成员变量)
 **/
public class FieldResolution {

    interface interface0 {
        int A = 0;
    }

    interface interface1 extends interface0 {
        int A = 1;
    }

    interface interface2 {
        int A = 2;
    }

    static class Parent implements interface1 {
        public static int A = 3;
    }

    static class Sub extends Parent implements interface2 {
        public static int A = 4;
    }

    public static void main(String[] args) {
        System.out.println(Sub.A);
        Sub sub = new Sub();

        if (sub instanceof Parent) {
            System.out.println("存在集成关系......");

        }
    }


}
